<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <title>Thymeleaf的入门</title>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
</head>
<body>
<p th:text="${hello}"></p>
<form th:action="@{/test/hello}">
    <input th:type="text" th:name="id">
    <button>提交</button>
</form>

<table>
    <tr>
        <th>下标</th>
        <th>编号</th>
        <th>姓名</th>
        <th>住址</th>
    </tr>
    <tr th:each="user,userStart:${users}">
        <td>
            下标:<span th:text="${userStart.index}"></span>,
        </td>
        <td th:text="${user.getId()}"></td>
        <td th:text="${user.getAddress()}"></td>
        <td th:text="${user.getName()}"></td>
    </tr>
</table>


<div th:each="map,mapStart:${dataMap}">
    <div th:text="${map}"></div>
    <div th:text="${mapStart}"></div>
    key:<span th:text="${mapStart.current.key}"></span><br/>
    value:<span th:text="${mapStart.current.value}"></span><br/>
    =================================================================
</div>

<div th:each="nm,nmStart:${names}">
    <span th:text="${nmStart.count}"></span>
    <span th:text="${nm}"></span>
    <span th:text="${nmStart}"></span>
</div>

<div>
    <span th:text="${#dates.format(now,'yyyy-MM-dd hh:ss:mm')}"></span>
</div>

<div>
    <span th:if="${(age>18)}">终于长大了!</span>
</div>

<div id="C" th:fragment="copy">
    关于我们<br/>
</div>

<!--<div id="A" th:include="footer::copy"></div>-->
</body>
</html>